package com.Tests;

import android.graphics.Color;
import android.test.AndroidTestCase;

import com.example.speedwaymanager.CGate;
import com.example.speedwaymanager.EColors;

/**
 * CGate tests
 * Created by Lukas on 08.10.13.
 */
public class CGateTest extends AndroidTestCase {
    public void testTranslateColorRed() throws Exception {
        CGate sut = new CGate("9", "C");
        assertEquals(Color.RED, sut.translateColor(EColors.eRed));
    }

    public void testTranslateColorBlue() throws Exception {
        CGate sut = new CGate("10", "B");
        assertEquals(Color.BLUE, sut.translateColor(EColors.eBlue));
    }

    public void testTranslateColorWhite() throws Exception {
        CGate sut = new CGate("2", "B");
        assertEquals(-10592685, sut.translateColor(EColors.eWhite));
    }

    public void testTranslateColorYellow() throws Exception {
        CGate sut = new CGate("1", "Z");
        assertEquals(-4801510, sut.translateColor(EColors.eYellow));
    }

    public void testTranslateColorNone() throws Exception {
        CGate sut = new CGate("11", "C");
        assertEquals(0, sut.translateColor(EColors.eNone));
    }

    public void testToString() throws Exception {
        CGate sut = new CGate("9", "C");
        assertEquals("9", sut.toString());
    }
}
